// import "./pick";
// import "./extract";

const modules = import.meta.glob("./*.ts");
Object.keys(modules).forEach((it) => {
  import(it);
});
// type HOUDUNREN = never extends string ? string : boolean;
// type ceshi = never | string | number;
type a1 = string | number;
type HD<T> = [T] extends [a1] ? string : boolean; // []就表示完全匹配而不是返回一个联合类型
// type HD<T> = T extends a1 ? string : boolean;

// 如果泛型是联合类型会分别执行然后返回一个联合类型  string | boolean

const c: HD<string | number> = "313";

type b1 = {
  name: string;
};

interface b2 extends b1 {
  age: number;
}
const b3: b2 = { age: 31, name: "fas" };

function c1<T extends { id: number; render(n: number): number }>(arr: T[]) {
  const temp = arr.map((a) => a.render(a.id));
  // console.log(temp);
}
c1([
  {
    id: 134,
    render(n) {
      // console.log(n);
      return n;
    },
  },
]);
export default {};
